#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#define N 4
int main()
{
    int x[N][N] = { {12,5,8,7},{6,1,9,3},{1,2,3,4},{2,8,4,3} }, y[N], i, j;
    printf("\nThe matrix :\n");
    for (i = 0;i < N;i++)
    {
        for (j = 0;j < N;j++)
            printf("%4d", x[i][j]);
        printf("\n");
    }
    for (i = 0;i < N;i++)
    {
        y[i] = x[i][0];
        for (j = 1;j < N;j++)
            if (y[i] < x[i][j])
                y[i] = x[i][j];
    }
    printf("\nThe result is:\n");
    for (i = 0;i < N;i++)
        printf("%3d", y[i]);
    printf("\n");
    return 0;
}
